﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace NetMicro.EventBus
{
    /// <summary>
    /// 消息释放锁操作
    /// </summary>
    public interface IMessageFixServiceProvider
    {
        /// <summary>
        /// 重试消息补偿
        /// </summary>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task RetryMessageExcute(CancellationToken cancellationToken);

        /// <summary>
        /// 延迟消息补偿
        /// </summary>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task DelayMessageExcute(CancellationToken cancellationToken);

        /// <summary>
        /// 死信消息补偿
        /// </summary>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task DeadLetterMessageExcute(CancellationToken cancellationToken);
    }
}
